package com.foreveredu.furedusys.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 领域模型类：学时统计
 * 
 * @author hushigang
 * 
 */
@Entity
@Table(name = "classhourcount")
public class ClassHourCount implements Serializable {

	private static final long serialVersionUID = 610920369026952674L;
	private int id;
	private User user;// 继续教育人员
	private Course course;// 所学课程
	private int classHours;// 已学学时
	private Term term;// 学期，每学期继续教育人员要完成相应学时

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne
	@JoinColumn(name = "course_id")
	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	@Column
	public int getClassHours() {
		return classHours;
	}

	public void setClassHours(int classHours) {
		this.classHours = classHours;
	}

	@ManyToOne
	@JoinColumn(name = "term_id")
	public Term getTerm() {
		return term;
	}

	public void setTerm(Term term) {
		this.term = term;
	}

}
